<template>
<div>
	<input type="text" :value="name1" @input="onNameInput1"/>
    <br>
    <input type="text" :value="name2" @input="onNameInput2"/>
</div>
</template>
<script>
export default {
	name: 'Vmodel2Child',
	props: {
		name1: String,
		name2: String,
	},
	emits:['update:name1', 'update:name2'],
	setup (props, context) {
		const onNameInput1 = (e) => {
            console.log(11);
            context.emit('update:name1', e.target.value);
		};
		const onNameInput2 = (e) => {
            console.log(22);
            context.emit('update:name2', e.target.value);
		};
		return {
			onNameInput1,
			onNameInput2,
		}
	}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>